## Replication files for "Ministerial Autonomy, Paliamentary Scrutiny and Government reform Output in Parliamentary Democracies"
## Authors: Hanna Bäck, Wolfgang C. Müller, Mariyana Angelova, Daniel Strobl
## Corresponding author: Mariyana Angelova - angelova@ceu.edu
## 15.01.2021

## This script creates Figure 5: Legislative Policing Strength Index - Country Average Values

## set working directory
setwd("~/Desktop/Replication files")

##==============================================================================================
## Data source Martin and Vanberg 2020, p. 333 (Figure 3 note)
## Reference: mMartin, L. and G. Vanberg 2020 Coalition Government, Legislative Institutions, and Public Policy in Parliamentary Democracies, American Journal of Political Science, 64(2): 325-340.
##==============================================================================================


    ## Strong
## Germany = 0.79
## Netherlands = 0.76  
## Austria = 0.76
## Sweden = 0.71
## Denmark = 0.63

    ## Moderate
## Finland = 0.43
## Italy = 0.42
## Norway = 0.41
## Belgium  = 0.41
## Portugal = 0.30

    ## Weak
## Spain = 0.23
## Greece = -0.50
## France = -1.05
## Ireland = -1.61
## Great Britain = -2.42 

##==============================================================================================
## plot figure 5 "Legislative Policing Strength Index – Country Average Values"
##==============================================================================================
pdf(file="figure5.pdf",width=9.5,height=7,paper='special') 
par(mar=c(5,5,4,4), xpd=T)

i<-c(0.79, 0.76, 0.76, 0.71, 0.63, 0.43, 0.42, 0.41, 0.41, 0.3, 0.23, -0.5, -1.05, -1.61, -2.42)
c<-c("Germany", "Netherlands", "Austria", "Sweden", "Denmark", "Finland","Italy", "Norway", "Belgium", "Portugal", "Spain", "Greece", "France", "Ireland", "UK")
cbind(i,c)

col<-c(rep("gray30", 5), rep("gray60", 5), rep("gray95", 6))


x<-barplot(i,xaxt = 'n', cex.lab=1.3,ylim=c(-3, 2), col=col, las=1, xlab="Parliamentary Ranking", ylab="Policing Srength Score (average)")
axis(side=1,at=x, labels=c(1:15), las=1, cex.axis=1.2, tick=F)
segments(-0.47,-3,x[15]+0.5,-3)
points(x[c(1,2,3,5,6,7,9,13,14)],y=rep(-0.1,9), pch=16, cex=0.7, col="gray50")

text(x[1:11],i[1:11]+0.07, labels=c[1:11], srt=90, pos=4, cex=1.1)
text(x[12:15],i[12:15]-0.25, labels=c[12:15], srt=90, pos=1, adj=1, cex=1.1)
#legend(x[12],2.5, legend=c("Strong", "Moderate", "Weak"), fill=c("gray30","gray60","gray90"), ncol=1, cex=1.25)
legend(x[3],-2.5, ncol=3, legend=c("Strong", "Moderate", "Weak"), fill=c("gray30","gray60","gray95"), cex=1.25)


dev.off()